import factory from './schema-factory';


export default factory({
  type: 'page',
  body: {
    type: 'wrapper',
    className: 'container w-xxl w-auto-xs',
    body: {
      type: 'form',
      className: 'm-t-lg',
      wrapWithPanel: false,
      redirect: '/home',
      api: '/api/login',
      controls: [
        {
          type: 'tpl',
          tpl: '<%= window.vars && window.vars.orgName || "志多星" %>管理系统登录',
          className: 'navbar-brand text-2x block m-t no-shadow m-b'
        },

        {
          type: 'panel',
          className: 'no-border no-bg',
          bodyClassName: 'no-padder',
          formClassName: 'list-group',
          controls: [
            {
              type: 'text',
              name: 'name',
              placeholder: '团队账号',
              className: 'list-group-item',
              inputClassName: 'no-border no-shadow  p-l-none p-r-none',
              required: true
            },

            {
              type: 'password',
              name: 'password',
              placeholder: '密码',
              className: 'list-group-item',
              inputClassName: 'no-border no-shadow  p-l-none p-r-none',
              required: true
            }
          ]
        },

        {
          type: 'submit',
          block: true,
          label: '登录',
          size: 'lg',
          primary: true
        },

        {
          type: 'button',
          level: 'info',
          block: true,
          label: '找回密码',
          size: 'lg',
          actionType: 'link',
          link: '/getpwd',
          noOffset: true
      },

        // {
        //     type: 'tpl',
        //     className: 'm-t-lg',
        //     tpl: '<p class="text-center"><small>没有账号？</small></p>'
        // },

        // {
        //   type: 'button',
        //   block: true,
        //   label: '团队注册',
        //   size: 'lg',
        //   actionType: 'link',
        //   link: '/register'
        // },

        // {
        //   type: 'tpl',
        //   className: 'text-center',
        //   tpl: `
        //   <p>
        //   <small class="text-muted">志多星管理系统<br>© 2017</small>
        //   </p>
        //   `
        // }

      ]
    }
  }
}, '登录页面');
